package danliebiao;


import org.testng.annotations.Test;

public class test {
  @Test
    public void test(){
        SinglyLinkedList list=new SinglyLinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.addFirst(4);
        list.loop();
        list.loop1(value->{
            System.out.println(value);
        });
        list.loop2(value->{
            System.out.println(value);
        });

    }
    @Test
    public void test1(){
        SinglyLinkedList list=new SinglyLinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.addFirst(4);
        for (Integer value:list){
            System.out.println(value);
        }
    }

    @Test
    public void test2(){
        SinglyLinkedList list=new SinglyLinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.addFirst(4);



    }



}
